nums = [1, 3, -1, -3, 5, 3, 6, 7],
    k = 3

var maxSlidingWindow = function (nums, k) {
    const len = nums.length
    const res = []
    const queue = []
    for (let i = 0; i < len; i++) {
        // if(i >= k && queue[0] <= i - k) {
        //     queue.shift()
        // }
        while (queue.length && nums[queue[queue.length - 1]] < nums[i]) {
            queue.pop()
        }
        queue.push(i)

        //最大值流出窗口
        while (queue.length && queue[0] <= i) { }


    }
}